package com.cd.javacxy.module.web.service;

import com.cd.javacxy.common.model.entity.CxyAttachment;
import com.cd.javacxy.common.model.entity.CxyTopic;
import com.cd.javacxy.common.model.entity.CxyTopicVote;
import com.cd.javacxy.common.model.query.TopicQuery;
import com.cd.javacxy.common.utils.PageResult;
import com.cd.javacxy.exception.BussinessException;

import java.util.List;

/**
 * CxyTopic的服务接口
 *
 * @author yanghy
 */
public interface CxyTopicService {


    CxyTopic getTopic(Integer topicId);

    PageResult<CxyTopic> findTopicByPage(TopicQuery topicQuery);

    List<CxyTopic> findActiveUsers();

    int findCount(TopicQuery topicQuery);

    CxyTopic showTopic(Integer topicId) throws BussinessException;

    void addTopic(CxyTopic topic, CxyTopicVote topicVote, String[] voteContent, CxyAttachment attachment) throws BussinessException;
}
